Integrand size = 14, antiderivative size = 87 \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {(2 a+b) \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} (a+b)^{3/2} d}+\frac {b \cos (c+d x) \sin (c+d x)}{2 a (a+b) d \left (a+b \sin ^2(c+d x)\right )} \]
1/2*(2*a+b)*arctan((a+b)^(1/2)*tan(d*x+c)/a^(1/2))/a^(3/2)/(a+b)^(3/2)/d+1 /2*b*cos(d*x+c)*sin(d*x+c)/a/(a+b)/d/(a+b*sin(d*x+c)^2)
Time = 11.20 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.97 \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {(2 a+b) \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{(a+b)^{3/2}}+\frac {\sqrt {a} b \sin (2 (c+d x))}{(a+b) (2 a+b-b \cos (2 (c+d x)))}}{2 a^{3/2} d} \]
(((2*a + b)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(a + b)^(3/2) + (S qrt[a]*b*Sin[2*(c + d*x)])/((a + b)*(2*a + b - b*Cos[2*(c + d*x)])))/(2*a^ (3/2)*d)
Time = 0.32 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 3663, 25, 27, 3042, 3660, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{\left (a+b \sin (c+d x)^2\right )^2}dx\) |
\(\Big \downarrow \) 3663 |
\(\displaystyle \frac {b \sin (c+d x) \cos (c+d x)}{2 a d (a+b) \left (a+b \sin ^2(c+d x)\right )}-\frac {\int -\frac {2 a+b}{b \sin ^2(c+d x)+a}dx}{2 a (a+b)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {2 a+b}{b \sin ^2(c+d x)+a}dx}{2 a (a+b)}+\frac {b \sin (c+d x) \cos (c+d x)}{2 a d (a+b) \left (a+b \sin ^2(c+d x)\right )}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {(2 a+b) \int \frac {1}{b \sin ^2(c+d x)+a}dx}{2 a (a+b)}+\frac {b \sin (c+d x) \cos (c+d x)}{2 a d (a+b) \left (a+b \sin ^2(c+d x)\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {(2 a+b) \int \frac {1}{b \sin (c+d x)^2+a}dx}{2 a (a+b)}+\frac {b \sin (c+d x) \cos (c+d x)}{2 a d (a+b) \left (a+b \sin ^2(c+d x)\right )}\) |
\(\Big \downarrow \) 3660 |
\(\displaystyle \frac {(2 a+b) \int \frac {1}{(a+b) \tan ^2(c+d x)+a}d\tan (c+d x)}{2 a d (a+b)}+\frac {b \sin (c+d x) \cos (c+d x)}{2 a d (a+b) \left (a+b \sin ^2(c+d x)\right )}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {(2 a+b) \arctan \left (\frac {\sqrt {a+b} \tan (c+d x)}{\sqrt {a}}\right )}{2 a^{3/2} d (a+b)^{3/2}}+\frac {b \sin (c+d x) \cos (c+d x)}{2 a d (a+b) \left (a+b \sin ^2(c+d x)\right )}\) |
((2*a + b)*ArcTan[(Sqrt[a + b]*Tan[c + d*x])/Sqrt[a]])/(2*a^(3/2)*(a + b)^ (3/2)*d) + (b*Cos[c + d*x]*Sin[c + d*x])/(2*a*(a + b)*d*(a + b*Sin[c + d*x ]^2))
3.2.3.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(-1), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff/f Subst[Int[1/(a + (a + b)*ff^2*x^ 2), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Simp[(-b)*C os[e + f*x]*Sin[e + f*x]*((a + b*Sin[e + f*x]^2)^(p + 1)/(2*a*f*(p + 1)*(a + b))), x] + Simp[1/(2*a*(p + 1)*(a + b)) Int[(a + b*Sin[e + f*x]^2)^(p + 1)*Simp[2*a*(p + 1) + b*(2*p + 3) - 2*b*(p + 2)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a + b, 0] && LtQ[p, -1]
Time = 0.60 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.00
method | result | size |
derivativedivides | \(\frac {\frac {b \tan \left (d x +c \right )}{2 a \left (a +b \right ) \left (a \left (\tan ^{2}\left (d x +c \right )\right )+\left (\tan ^{2}\left (d x +c \right )\right ) b +a \right )}+\frac {\left (2 a +b \right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{2 a \left (a +b \right ) \sqrt {a \left (a +b \right )}}}{d}\) | \(87\) |
default | \(\frac {\frac {b \tan \left (d x +c \right )}{2 a \left (a +b \right ) \left (a \left (\tan ^{2}\left (d x +c \right )\right )+\left (\tan ^{2}\left (d x +c \right )\right ) b +a \right )}+\frac {\left (2 a +b \right ) \arctan \left (\frac {\left (a +b \right ) \tan \left (d x +c \right )}{\sqrt {a \left (a +b \right )}}\right )}{2 a \left (a +b \right ) \sqrt {a \left (a +b \right )}}}{d}\) | \(87\) |
risch | \(-\frac {i \left (2 a \,{\mathrm e}^{2 i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}-b \right )}{a \left (a +b \right ) d \left (-b \,{\mathrm e}^{4 i \left (d x +c \right )}+4 a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}-b \right )}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i a^{2}+2 i a b +2 a \sqrt {-a^{2}-a b}+b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right ) b}{4 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d a}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a^{2}+2 i a b -2 a \sqrt {-a^{2}-a b}-b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right )}{2 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i a^{2}+2 i a b -2 a \sqrt {-a^{2}-a b}-b \sqrt {-a^{2}-a b}}{b \sqrt {-a^{2}-a b}}\right ) b}{4 \sqrt {-a^{2}-a b}\, \left (a +b \right ) d a}\) | \(457\) |
1/d*(1/2*b/a/(a+b)*tan(d*x+c)/(a*tan(d*x+c)^2+tan(d*x+c)^2*b+a)+1/2*(2*a+b )/a/(a+b)/(a*(a+b))^(1/2)*arctan((a+b)*tan(d*x+c)/(a*(a+b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 181 vs. \(2 (75) = 150\).
Time = 0.29 (sec) , antiderivative size = 463, normalized size of antiderivative = 5.32 \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\left [-\frac {4 \, {\left (a^{2} b + a b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left ({\left (2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - 3 \, a b - b^{2}\right )} \sqrt {-a^{2} - a b} \log \left (\frac {{\left (8 \, a^{2} + 8 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (4 \, a^{2} + 5 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left ({\left (2 \, a + b\right )} \cos \left (d x + c\right )^{3} - {\left (a + b\right )} \cos \left (d x + c\right )\right )} \sqrt {-a^{2} - a b} \sin \left (d x + c\right ) + a^{2} + 2 \, a b + b^{2}}{b^{2} \cos \left (d x + c\right )^{4} - 2 \, {\left (a b + b^{2}\right )} \cos \left (d x + c\right )^{2} + a^{2} + 2 \, a b + b^{2}}\right )}{8 \, {\left ({\left (a^{4} b + 2 \, a^{3} b^{2} + a^{2} b^{3}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} d\right )}}, -\frac {2 \, {\left (a^{2} b + a b^{2}\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left ({\left (2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a^{2} - 3 \, a b - b^{2}\right )} \sqrt {a^{2} + a b} \arctan \left (\frac {{\left (2 \, a + b\right )} \cos \left (d x + c\right )^{2} - a - b}{2 \, \sqrt {a^{2} + a b} \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{4 \, {\left ({\left (a^{4} b + 2 \, a^{3} b^{2} + a^{2} b^{3}\right )} d \cos \left (d x + c\right )^{2} - {\left (a^{5} + 3 \, a^{4} b + 3 \, a^{3} b^{2} + a^{2} b^{3}\right )} d\right )}}\right ] \]
[-1/8*(4*(a^2*b + a*b^2)*cos(d*x + c)*sin(d*x + c) + ((2*a*b + b^2)*cos(d* x + c)^2 - 2*a^2 - 3*a*b - b^2)*sqrt(-a^2 - a*b)*log(((8*a^2 + 8*a*b + b^2 )*cos(d*x + c)^4 - 2*(4*a^2 + 5*a*b + b^2)*cos(d*x + c)^2 + 4*((2*a + b)*c os(d*x + c)^3 - (a + b)*cos(d*x + c))*sqrt(-a^2 - a*b)*sin(d*x + c) + a^2 + 2*a*b + b^2)/(b^2*cos(d*x + c)^4 - 2*(a*b + b^2)*cos(d*x + c)^2 + a^2 + 2*a*b + b^2)))/((a^4*b + 2*a^3*b^2 + a^2*b^3)*d*cos(d*x + c)^2 - (a^5 + 3* a^4*b + 3*a^3*b^2 + a^2*b^3)*d), -1/4*(2*(a^2*b + a*b^2)*cos(d*x + c)*sin( d*x + c) + ((2*a*b + b^2)*cos(d*x + c)^2 - 2*a^2 - 3*a*b - b^2)*sqrt(a^2 + a*b)*arctan(1/2*((2*a + b)*cos(d*x + c)^2 - a - b)/(sqrt(a^2 + a*b)*cos(d *x + c)*sin(d*x + c))))/((a^4*b + 2*a^3*b^2 + a^2*b^3)*d*cos(d*x + c)^2 - (a^5 + 3*a^4*b + 3*a^3*b^2 + a^2*b^3)*d)]
Timed out. \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\text {Timed out} \]
Time = 0.39 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.02 \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {b \tan \left (d x + c\right )}{a^{3} + a^{2} b + {\left (a^{3} + 2 \, a^{2} b + a b^{2}\right )} \tan \left (d x + c\right )^{2}} + \frac {{\left (2 \, a + b\right )} \arctan \left (\frac {{\left (a + b\right )} \tan \left (d x + c\right )}{\sqrt {{\left (a + b\right )} a}}\right )}{\sqrt {{\left (a + b\right )} a} {\left (a^{2} + a b\right )}}}{2 \, d} \]
1/2*(b*tan(d*x + c)/(a^3 + a^2*b + (a^3 + 2*a^2*b + a*b^2)*tan(d*x + c)^2) + (2*a + b)*arctan((a + b)*tan(d*x + c)/sqrt((a + b)*a))/(sqrt((a + b)*a) *(a^2 + a*b)))/d
Time = 0.37 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.30 \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\frac {{\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a + 2 \, b\right ) + \arctan \left (\frac {a \tan \left (d x + c\right ) + b \tan \left (d x + c\right )}{\sqrt {a^{2} + a b}}\right )\right )} {\left (2 \, a + b\right )}}{{\left (a^{2} + a b\right )}^{\frac {3}{2}}} + \frac {b \tan \left (d x + c\right )}{{\left (a \tan \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + a\right )} {\left (a^{2} + a b\right )}}}{2 \, d} \]
1/2*((pi*floor((d*x + c)/pi + 1/2)*sgn(2*a + 2*b) + arctan((a*tan(d*x + c) + b*tan(d*x + c))/sqrt(a^2 + a*b)))*(2*a + b)/(a^2 + a*b)^(3/2) + b*tan(d *x + c)/((a*tan(d*x + c)^2 + b*tan(d*x + c)^2 + a)*(a^2 + a*b)))/d
Time = 13.45 (sec) , antiderivative size = 79, normalized size of antiderivative = 0.91 \[ \int \frac {1}{\left (a+b \sin ^2(c+d x)\right )^2} \, dx=\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (c+d\,x\right )\,\left (2\,a+2\,b\right )}{2\,\sqrt {a}\,\sqrt {a+b}}\right )\,\left (2\,a+b\right )}{2\,a^{3/2}\,d\,{\left (a+b\right )}^{3/2}}+\frac {b\,\mathrm {tan}\left (c+d\,x\right )}{2\,a\,d\,\left (\left (a+b\right )\,{\mathrm {tan}\left (c+d\,x\right )}^2+a\right )\,\left (a+b\right )} \]